package com.globallogic.training.university;

import static org.junit.Assert.*;

import org.easymock.EasyMock;

import org.junit.Before;
import org.junit.Test;

import com.globallogic.training.university.people.Teacher;
import com.globallogic.training.university.property.Auditorium;
import com.globallogic.training.university.study.Course;

public class ScheduledItemTestWithMock {

	private ScheduledItem scheduledItem;
	
	private ScheduledTime wednesday3PM;
	private Course phisics;
	private Auditorium auditorium101;
	private Teacher ivanPetrov;
	
	@Before
	public void setUp() throws Exception {
		wednesday3PM = EasyMock.createMock(ScheduledTime.class);
		phisics = EasyMock.createMock(Course.class);
		auditorium101 = EasyMock.createMock(Auditorium.class);
		ivanPetrov = EasyMock.createMock(Teacher.class);
		
		scheduledItem = new ScheduledItem(wednesday3PM, phisics, auditorium101, ivanPetrov);
	}

	@Test
	public void shouldBeInstance_WhenCorrectConstructor() {	
		assertTrue(scheduledItem instanceof ScheduledItem);
	}

	@Test
	public void shouldHaveCorrectScheduledTime_WhenCorrectConstructor() {	
		assertEquals(wednesday3PM, scheduledItem.getScheduledTime());		
	}
}
